I think the State is right here. They want primary allegiance to their cause, not primary allegiance to a religion.
If her religion tells her to violate the law or compromise information, she would do it, there is no way you can hire someone on those basis for an entrusted position. That is basically what the oath of allegiance is, it's a written or verbal contract that you will put the law ahead of your own self-interest.
bear true faith and allegiance
That is the same as upholding loyalty or commitment. If you do not wish to bear allegiance, you're basically saying you're not willing to uphold loyalty/commitment when it comes to religious interference.
nor to participate in political or military affairs.
If you work for any government agency, you're engaging in political/military affairs. It's the definition of government.